Cast(TResult) Method

Task Parallel System.Threading

Converts the elements of a ParallelQuery to the specified type.

Namespace:  System.Linq
Assembly:  System.Threading (in System.Threading.dll)

Syntax

Visual Basic (Declaration)
Public Shared Function Cast(Of TResult) ( _
	source As ParallelQuery _
) As ParallelQuery(Of TResult)
C#
public static ParallelQuery<TResult> Cast<TResult>(
	ParallelQuery source
)

Parameters

source
Type: System.Linq..::.ParallelQuery
The sequence that contains the elements to be converted.

Type Parameters

TResult
The type to convert the elements of source to.

Return Value

A sequence that contains each element of the source sequence converted to the specified type.

Exceptions

ExceptionCondition
System..::.ArgumentNullException source is a null reference (Nothing in Visual Basic).

See Also